
<div class="btn-group"><a href="<?php echo site_urlc('account/index');?>" class="btn"> <i class="fa fa-arrow-left"></i> <?php echo lang('back_list')?> </a></div>

<?php include_once 'inc_form_errors.php'; ?>

<div class="boxed">
	<h3> <i class="fa fa-pencil"></i> 编辑消息 <span class="badge badge-success pull-right"><?php echo $title; ?></span></h3>
	<?php echo form_open(current_urlc(), array('class' => 'form-horizontal', 'id' => 'frm-edit')); ?>

	<div class="boxed-inner seamless">
		<div class="control-group">
			<label for="title" class="control-label">姓名:</label>
			<div class="controls">
				<label><?php echo $it['uname']?></label>
			</div>
		</div>
		<div class="control-group">
			<label for="title" class="control-label">职位:</label>
			<div class="controls">
				<label><?php echo $it['position']?></label>
			</div>
		</div>
		<div class="control-group">
			<label for="title" class="control-label">手机号:</label>
			<div class="controls">
				<?php echo $it['phone']?>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 头像:</label>
			<div class="controls">
				<?php
				if($it['thumb']) {
					$photo = $it['thumb'];
				} else {
					$photo_url = one_upload($it['photo']);
					$photo = UPLOAD_URL.$photo_url['url'];

				}
				?>
				<img src="<?php echo $photo ?>" alt="<?php echo $it['nickname'];?>">
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 所属分类:</label>
			<div class="controls">
				<?php $title = get_ctype_title($it['ctype']); echo $title['title'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 用户状态:</label>
			<div class="controls">
				<?php switch($it['status']) {
					case 0:
						echo '审核不通过';
						break;
					case 1:
						echo '正在审核';
						break;
					case 2:
						echo '审核通过';
						break;
				}?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 公司全称<?php echo $it['com_name']?>:</label>
			<div class="controls">
				<?php echo trim($it['com_name']) ? $it['com_name'] : $company['name'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 公司简称:</label>
			<div class="controls">
				<?php echo trim($it['com_short']) ? $it['com_short'] : $company['short'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 关注数:</label>
			<div class="controls">
				<?php echo $it['concerns'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 	粉丝数:</label>
			<div class="controls">
				<?php echo $it['fans'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 活跃度:</label>
			<div class="controls">
				<?php echo $it['activity'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 悬赏总额:</label>
			<div class="controls">
				<?php echo $it['reward'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 	认领数:</label>
			<div class="controls">
				<?php echo $it['claims'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 	评价星数:</label>
			<div class="controls">
				<?php echo $it['stars'] ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 注册时间:</label>
			<div class="controls">
				<?php echo date('Y-m-d H:i:s',$it['reg_time']) ?>
				<span class="help-inline"></span>
			</div>
		</div>
		<?php foreach($info['exts'] as $key=> $val) {?>
			<div class="control-group">
				<label class="control-label" for="status"> <?php echo $val['key']?>:</label>
				<div class="controls">
					<?php echo $val['value'] ?>
					<span class="help-inline"></span>
				</div>
			</div>
		<?php }?>
		<?php
		$title_arr = array();
		switch($it['ctype']) {
			case 1:

				break;
			case 2:
				$title_arr = array(
					array(
						'title'=>'已投项目/已服务企业',
						'value'=>$info['enterprises'] ? implode(' | ',unserialize($info['enterprises'])): '无',
					),
					array(
						'title'=>'企业简介',
						'value'=>$info['cprofile'] ? $info['cprofile'] : $company['desc']
					)
				);
				break;
			case 3:
				$title_arr = array(
					array(
						'title'=>'是否有新三板账户',
						'value'=>$it['board'] ? '有': '无',
					)
				);
				break;
			case 4:
				break;
			case 5:
				$title_arr = array(
					array(
						'title'=>'已投项目/已服务企业',
						'value'=>$info['enterprises'] ? implode(' | ',unserialize($info['enterprises'])): '无',
					),
					array(
						'title'=>'企业简介',
						'value'=>$info['cprofile'] ? $info['cprofile'] : $company['desc']
					)
				);
				break;
			case 6:
				$title_arr = array(
					array(
						'title'=>'已投项目/已服务企业',
						'value'=>$info['enterprises'] ? implode(' | ',unserialize($info['enterprises'])): '无',
					),
					array(
						'title'=>'企业简介',
						'value'=>$info['cprofile'] ? $info['cprofile'] : $company['desc']
					)
				);
				break;
		}?>
		<?php if($title_arr) {?>
			<?php foreach($title_arr as $value) {?>
			<div class="control-group">
				<label class="control-label" for="status"> <?php echo $value['title']?>:</label>
				<div class="controls">
					<?php echo $value['value']?>
					<span class="help-inline"></span>
				</div>
			</div>
			<?php }?>
		<?php }?>
		<div class="control-group">
			<label class="control-label" for="status"> 名片:</label>
			<div class="controls">
				<?php
				if($info['thumb'] && file_exists(UPLOAD_PATH.$info['thumb'])) {
					$card = $info['thumb'];
				} else {
					$card_url = one_upload($info['card']);
					$card = UPLOAD_URL.$card_url['url'];
				}
				?>
				<img src="<?php echo $card ?>" alt="<?php echo $it['nickname'];?>">
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 个人简介:</label>
			<div class="controls">
				<?php echo $info['profile']?>
				<span class="help-inline"></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label" for="status"> 邀请人:</label>
			<div class="controls">
				<?php echo $it['inviter']?>
				<span class="help-inline"></span>
			</div>
		</div>
	</div>
</form>
</div>

<script type="text/javascript">
	require(['adminer/js/ui','adminer/js/media','bootstrap-datetimepicker.zh'],function(ui,media){
		$('.timepicker').datetimepicker({'language':'zh-CN','format':'yyyy/mm/dd hh:ii:ss','todayHighlight':true});
		media.init();
		var accounts_photos = <?php echo json_encode(one_upload($it['photo'])) ?>;
		media.show(accounts_photos,"photo");

	});
</script>
